﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PersonaLibrary.ViewModel.ExcelViewModel;

namespace PersonaLibrary.Commands.Excel
{
    internal class ExportCutCollection : CommandBase
    {
        public override bool CanExecute(object parameter)
        {
            return parameter is IEnumerable<Data.BaseEntity>;
        }

        public override void Execute(object parameter)
        {
            ExportCutVersion vm = new ExportCutVersion(((IEnumerable<Data.BaseEntity>)parameter).Cast<Data.Employee>());
            vm.View.ShowDialog();
        }
    }
}
